package com.lagou.homework;

import org.apache.hadoop.io.*;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class HomeworkMapper extends Mapper<LongWritable, Text, Bean, NullWritable> {

    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {

        Bean bean = new Bean();
        bean.setNum(Integer.parseInt(value.toString()));
        context.write(bean, NullWritable.get());
    }
}
